Fix to work on empty models.
authorJoshua N Pritikin <vishnu@src.gnome.org>
Fri, 12 Oct 2001 18:39:14 +0000 (18:39 +0000)
committerJoshua N Pritikin <vishnu@src.gnome.org>
Fri, 12 Oct 2001 18:39:14 +0000 (18:39 +0000)
* gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): Fix to work
on empty models.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktreeview.c

index 3ce8773f762b166dc6c5a12189aefbdc443cbd05..74c64433f2262b10df929efa1db1bdeb2e2b2a1a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Oct 12 11:39:20 2001  Joshua N Pritikin  <vishnu@pobox.com>
+
+       * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): Fix to work
+       on empty models.
+
 2001-10-11  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtkcolorsel.c, gtk/gtkwidget.c, gtk/gtktreeview.c:
index 3ce8773f762b166dc6c5a12189aefbdc443cbd05..74c64433f2262b10df929efa1db1bdeb2e2b2a1a 100644 (file)
@@ -1,3 +1,8 @@
+Fri Oct 12 11:39:20 2001  Joshua N Pritikin  <vishnu@pobox.com>
+
+       * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): Fix to work
+       on empty models.
+
 2001-10-11  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtkcolorsel.c, gtk/gtkwidget.c, gtk/gtktreeview.c:
index 3ce8773f762b166dc6c5a12189aefbdc443cbd05..74c64433f2262b10df929efa1db1bdeb2e2b2a1a 100644 (file)
@@ -1,3 +1,8 @@
+Fri Oct 12 11:39:20 2001  Joshua N Pritikin  <vishnu@pobox.com>
+
+       * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): Fix to work
+       on empty models.
+
 2001-10-11  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtkcolorsel.c, gtk/gtkwidget.c, gtk/gtktreeview.c:
index 3ce8773f762b166dc6c5a12189aefbdc443cbd05..74c64433f2262b10df929efa1db1bdeb2e2b2a1a 100644 (file)
@@ -1,3 +1,8 @@
+Fri Oct 12 11:39:20 2001  Joshua N Pritikin  <vishnu@pobox.com>
+
+       * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): Fix to work
+       on empty models.
+
 2001-10-11  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtkcolorsel.c, gtk/gtkwidget.c, gtk/gtktreeview.c:
index 3ce8773f762b166dc6c5a12189aefbdc443cbd05..74c64433f2262b10df929efa1db1bdeb2e2b2a1a 100644 (file)
@@ -1,3 +1,8 @@
+Fri Oct 12 11:39:20 2001  Joshua N Pritikin  <vishnu@pobox.com>
+
+       * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): Fix to work
+       on empty models.
+
 2001-10-11  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtkcolorsel.c, gtk/gtkwidget.c, gtk/gtktreeview.c:
index 3ce8773f762b166dc6c5a12189aefbdc443cbd05..74c64433f2262b10df929efa1db1bdeb2e2b2a1a 100644 (file)
@@ -1,3 +1,8 @@
+Fri Oct 12 11:39:20 2001  Joshua N Pritikin  <vishnu@pobox.com>
+
+       * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): Fix to work
+       on empty models.
+
 2001-10-11  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtkcolorsel.c, gtk/gtkwidget.c, gtk/gtktreeview.c:
index 3ce8773f762b166dc6c5a12189aefbdc443cbd05..74c64433f2262b10df929efa1db1bdeb2e2b2a1a 100644 (file)
@@ -1,3 +1,8 @@
+Fri Oct 12 11:39:20 2001  Joshua N Pritikin  <vishnu@pobox.com>
+
+       * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): Fix to work
+       on empty models.
+
 2001-10-11  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtkcolorsel.c, gtk/gtkwidget.c, gtk/gtktreeview.c:
index 0e184a02099845902deedb208d15faa3217b3fc3..b195eeef77f0ea210a2b7c70e34724f88966f94e 100644 (file)
@@ -8036,7 +8036,6 @@ gtk_tree_view_get_path_at_pos (GtkTreeView        *tree_view,
   gint y_offset;
 
   g_return_val_if_fail (tree_view != NULL, FALSE);
-  g_return_val_if_fail (tree_view->priv->tree != NULL, FALSE);
   g_return_val_if_fail (tree_view->priv->bin_window != NULL, FALSE);
 
   if (window)
@@ -8047,6 +8046,9 @@ gtk_tree_view_get_path_at_pos (GtkTreeView        *tree_view,
   if (column)
     *column = NULL;
 
+  if (tree_view->priv->tree == NULL)
+    return FALSE;
+
   if (x > tree_view->priv->hadjustment->upper)
     return FALSE;